<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * @property string app_name
 * @property integer biz_type
 * @property string app_id
 * @property string decrypt_key
 * @property string alipay_uid
 *
 */
class AppTypeModel extends Model
{
    use HasFactory;
    use SoftDeletes;

    const KEY = 'id';
    const TABLE = 'sp_app_type';

    protected $table = self::TABLE;
    protected $primaryKey = self::KEY;

    // public $timestamps = false;
    const CREATED_AT = 'create_time';
    const UPDATED_AT = 'update_time';
    const DELETED_AT = 'delete_time';

    protected $guarded = [];

    /**
     * @param $id
     * @return AppTypeModel|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection|Model
     */
    public static function findById($id)
    {
        return self::query()->find($id);
    }
}
